79 WDT_A_hold(WDT_A_BASE);
88 GPIO_setAsPeripheralModuleFunctionInputPin(
90 GPIO_PIN4 + GPIO_PIN5,
91 GPIO_PRIMARY_MODULE_FUNCTION
102 GPIO_setAsPeripheralModuleFunctionInputPin(
105 GPIO_SECONDARY_MODULE_FUNCTION
114 GPIO_setAsPeripheralModuleFunctionInputPin(
116 GPIO_PIN6 + GPIO_PIN7,
117 GPIO_SECONDARY_MODULE_FUNCTION
121 EUSCI_B_SPI_initSlaveParam
param = {0};
122 param.msbFirst = EUSCI_B_SPI_MSB_FIRST;
123 param.clockPhase = EUSCI_B_SPI_PHASE_DATA_CHANGED_ONFIRST_CAPTURED_ON_NEXT;
124 param.clockPolarity = EUSCI_B_SPI_CLOCKPOLARITY_INACTIVITY_HIGH;
125 param.spiMode = EUSCI_B_SPI_3PIN;
126 EUSCI_B_SPI_initSlave(EUSCI_B0_BASE, &
param);
129 EUSCI_B_SPI_enable(EUSCI_B0_BASE);
131 EUSCI_B_SPI_clearInterrupt(EUSCI_B0_BASE,
132 EUSCI_B_SPI_RECEIVE_INTERRUPT);
134 EUSCI_B_SPI_enableInterrupt(EUSCI_B0_BASE,
135 EUSCI_B_SPI_RECEIVE_INTERRUPT
138 __bis_SR_register(LPM0_bits + GIE);
147 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
148 #pragma vector=USCI_B0_VECTOR
150 #elif defined(__GNUC__)
151 __attribute__((interrupt(USCI_B0_VECTOR)))
155 switch (__even_in_range(UCB0IV,4)){
159 while (!EUSCI_B_SPI_getInterruptStatus(EUSCI_B0_BASE,
160 EUSCI_B_SPI_TRANSMIT_INTERRUPT
164 EUSCI_B_SPI_transmitData(EUSCI_B0_BASE,
169 receiveData = EUSCI_B_SPI_receiveData(EUSCI_B0_BASE);
MPU_initThreeSegmentsParam param